/*37218898_306040569 Lihi_Dery_Luba_Golosman*/
import java.util.ArrayList;
import java.util.HashMap;


public class Document {
	private ArrayList<String> words = new ArrayList<String>();

	private HashMap<String,Integer> eventMap = new HashMap<String,Integer>();
	
	
	public ArrayList<String> getWords() {
		return words;
	}
	public void setWords(ArrayList<String> words) {
		this.words = words;
	}
	public HashMap<String, Integer> getEventMap() {
		return eventMap;
	}
	public void setEventMap(HashMap<String, Integer> eventMap) {
		this.eventMap = eventMap;
	}
	
	public void InitializeEventMap()
	{
		/* takes a corpus, and creates a Hashmap from the corpus events*/
			 eventMap = new HashMap <String,Integer>();

				for (String event : words) {			
				 if (eventMap.containsKey(event) )
				 {
					 eventMap.put(event,eventMap.get(event)+1);				 
				 } 
				 else
				 { 
					 eventMap.put(event, 1);				 				 
				 }
			}

	}
	public int getNumWords() {
		return words.size();
	}
}
